﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace WebApplication1
{
    public partial class Login : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string username = (string)Session["username"];
            string password = (string)Session["password"];
            string  a = Request.HttpMethod;
            Response.Write(a);
            if (a == "GET")
            {
                username = Request.QueryString["username"];
                password = Request.QueryString["password"];
            }
            if (a == "POST")
	        {
                username = Request.Params["TextBox1"];
                password = Request.Params["TextBox2"];
	        }
        }

        //protected void Button1_Click(object sender, EventArgs e)
        //{
        //   string username = (string)Session["username"];
        //    string password = (string)Session["password"];
        //    Literal1.Text = "欢迎你," + Session["username"] + ",你的密码是：" + Session["password"];
        // }
    }
}